package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.entity.Dish;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*
* 菜品口味的接口
* */
@Mapper
public interface DishFlavorsMapper {

    /*
    * 新增菜品口味
    * */
    @AutoFill(value = OperationType.INSERT)
    void insertFlavors(List<DishFlavor> dishFlavorList);

    /*
    * 批量删除菜品口味信息
    * */
    void deleteDishFlavorsByIds(List<Long> dishIds);

    /*
    * 根据id查询菜品口味信息
    * */
    @Select("select * from dish_flavor where dish_id = #{id}")
    List<DishFlavor> selectDishFlavorsByDishId(Long id);
}
